import 'dart:ui';

import '../../base/chart_entity.dart';

/// 轴线图实体基类
class AxisEntity extends ChartEntity {
  AxisEntity({this.xIndex = 0, super.value, super.isDraw, super.data});

  final int xIndex;

  /// 绘制时的坐标，如果仅绘制点，则[Rect.left]==[Rect.right],[Rect.top]==[Rect.bottom]。
  /// 注意获取时机，数据未绘制或正在刷新，数据可能不准确。
  Rect get drawRect => _drawRect;
  Rect _drawRect = Rect.zero;

  /// 非自定义绘制，不要主动赋值
  set $drawRect(Rect rect) => _drawRect = rect;
}
